<template>
  <div>
    <h2>孙子组件：</h2>
    <div>接收的b:{{ b }}， y：{{ y }}</div>
    <div>孙子的attrs属性: {{ $attrs }}</div>
    <div>
      <el-button type="primary" @click="handleClick">给爷爷传值</el-button>
    </div>
  </div>
</template>
<script setup lang="ts">
const props = defineProps(['b', 'y', 'updateB'])

const handleClick = () => {
  props.updateB(props.b + '~')
}
</script>
<style scoped></style>
